import scrapy


class BaiduspiderSpider(scrapy.Spider):
    # 爬虫名
    name = 'BaiduSpider'
    # 允许访问的域名
    allowed_domains = ['baidu.com','jd.com']
    # 爬虫程序启动时会访问的url
    start_urls = ['http://baidu.com/','http://jd.com']

    def parse(self, response):
        # 打印获取到的数据
        print(response.text)
